Using GrADS on the under MS-DOS (chapter 20)

Hardware considerations

GrADS for the PC operates in 32-bit mode and is compiled with the WATCOM C compiler, and comes with the DOS extender DOS4GW.EXE. This version requires a 386 or 486 machine with a math coprocessor (note that the 486DX chip includes a math coprocessor).

The supplied 'grads.exe' and 'gxtran.exe' will operate at various screen resolutions, depending on the setting of the environment variable GAVIDEO:

set gavideo=vga VGA, 16 color, 640x480 (the default)

set gavideo=ega EGA, 16 color, 640x350

set gavideo=vga256 VGA, 256 color, 640x480

set gavideo=svga SVGA, 256 color, 800x600

set gavideo=xvga SVGA, 256 color, 1024x768

You should not specify resolutions above VGA resolution and colors above 16 colors unless your graphics card and monitor are capable of handling such. One compiler vendor warns that it may be possible to damage your monitor if it is not capable of the requested resolution.

Some limitations of the PC version:

- does not support mouse point-and-click. The 'q pos' command returns -999 -999.

- does not support animation

- the text and grahpics windows are 'shared', thus the text can overlay the graphics. This can be gotten around to some extent by using one of the scripts:

stack.gs - allows you to enter commands until you enter the 'flush' command, then displays the results of those commands without overlaid text.

frame.gs - 'separates' the text and graphics windows by clearing the screen when a display command is entered, issuing the display command, then waiting for you to press enter before clearing the screen and returning to text mode.

Note that even though the text appears on the screen with the graphics, it will not appear on a hardcopy plot were the frame printed.

Data sets from other platforms

Binary gridded data sets may be moved from any UNIX machine to the PC and displayed using GrADS. The PC has a different byte order than most UNIX environments, such as Sun, IBM, Iris, and CRAY IEEE. The PC has the same byte order as the DECstations. Simply move the GrADS format gridded data set in binary mode, then if needed put the OPTIONS BYTESWAPPED keyword in the data descriptor file. See Appendix A for more info.

Printing on non-postscript printers

If you do not have a postscript printer available, you may want to obtain ghostscript, a utility for printing postscript files on non-postscript printers. This utility is available from various anonymous ftp sources and works extremely well.

Incorporating GrADS pictures into PC software

Ghostscript comes with a utility, ps2epsi, which will convert postscript files into encapsulated postscript (.eps) suitable for importing into graphics software. Unfortunately, many of the graphics import filters expect Adobe Illustrator compatable .eps files and the import fails. There are two solutions to this problem. You can convert your picture to a bitmap using Ghostsript or any screen-capture utility. If you need to edit the picture, or re-size it, you need a program like CorelDraw 5 which imports postscript files directly (you do not need to use the Ghostscript utility). This works well for pictures without shading, for example, contour plots, and for shaded output to a colour printer. Shaded pictures output to a Laserjet using greyscales, however, have not the same quality as when output to a postscript printer.

The beta version 1.5 of GrADS comes with a very useful MS Windows utility, gv.exe. This will import GrADS metafiles directly and these can then be pasted into other Windows applications. Although at a fairly early stage of development, gv offers the best solution so far to printing and editing your GrADS pictures on a monochrome laser printer.